{% extends "books/base.html" %}

{% block title %}
<title>author list</title>
{% endblock %}

{% block body %}
<div id="page">
  <h2>author list</h2>
  <a href="{% url 'book:author_add' %}">create author</a>
  <table class="tab1">
    <thead>
      <tr><th>No</th><th>name</th><th>email</th></tr>
    </thead>
    <tfoot>
      <tr><th>This is the foot of the table</th></tr>
    </tfoot>
    <tbody>
      {% for author in author_list %}
      <tr>
        <td><a href="{{ author.get_absolute_url }}">{{ author.id }}</a></td>
        <td>{{ author.name }}</td>
        <td>{{ author.email }}</td>
        <td><a href="{% url 'book:author_delete' author.id %}">Delete author</a></td>
      </tr>
      {% endfor %}
    </tbody>
  </table>
</div>
{% endblock %}
